﻿@using PagedList; <!-- import this so we can cast our list to IPagedList (only necessary because ViewBag is dynamic) -->
@using PhoneStoreWeb.Helpers;

@{
    ViewBag.Title = "Index";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

@section LeftMenu
{
    <ul>
        @Html.Action(actionName: "CategoryMenu", controllerName: "Product")
    </ul>
}

@section RightMenu
{
    <div class="product-features">
        <img src="~/Images/Icons/ProductFeatures.png" alt="ProductFeatures.png" width="40" height="30" />
        <ul>
            @Html.MenuItem("Sản phẩm nổi bật", "Highlighted", "Product", "product-features-activated")
            @Html.MenuItem("Sản phẩm mới", "New", "Product", "product-features-activated")
            @Html.MenuItem("Sản phẩm bán chạy", "Selling", "Product", "product-features-activated")
            @Html.MenuItem("Sản phẩm khuyến mãi", "Promotion", "Product", "product-features-activated")
        </ul>
    </div>
}

<link href="~/Content/PagedList.css" rel="stylesheet" type="text/css" />

<div class="products">
    @Html.Partial("DisplayProducts", (IPagedList)ViewBag.OnePageOfProducts)
</div>